/**
 * 
 */
package fr.ema.arch3d.editor.mainGUI;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;

import org.dyno.visual.swing.layouts.Constraints;
import org.dyno.visual.swing.layouts.GroupLayout;
import org.dyno.visual.swing.layouts.Leading;

//VS4E -- DO NOT REMOVE THIS LINE!
public class menuGui extends JFrame {

    private static final long serialVersionUID = 1L;
    private JMenuItem openJMenuItem;
    private JMenu jMenu;
    private JMenuItem newJMenuItem;
    private JMenu specJMenu;
    private JMenu configJMenu;
    private JMenu assJMenu;
    private JMenu evolutionJMenu;
    private JMenuItem nameCJMenuItem;
    private JMenu checkerJMenu;
    private JMenuItem behCJMenuItem;
    private JMenu jMenu0;
    private JPopupMenu jPopupMenu0;
    private JLabel jLabel0;
    private JPopupMenu jPopupMenu1;
    private JTree jTree0;
    private JScrollPane jScrollPane0;
    private static final String PREFERRED_LOOK_AND_FEEL = "javax.swing.plaf.metal.MetalLookAndFeel";
    public menuGui() {
	initComponents();
    }

    private void initComponents() {
    	setLayout(new GroupLayout());
    	add(getJLabel0(), new Constraints(new Leading(49, 10, 10), new Leading(104, 10, 10)));
    	add(getJScrollPane0(), new Constraints(new Leading(172, 150, 10, 10), new Leading(-10, 200, 10, 10)));
    	setSize(424, 240);
    }

    private JScrollPane getJScrollPane0() {
    	if (jScrollPane0 == null) {
    		jScrollPane0 = new JScrollPane();
    		jScrollPane0.setViewportView(getJTree0());
    	}
    	return jScrollPane0;
    }

    private JTree getJTree0() {
    	if (jTree0 == null) {
    		jTree0 = new JTree();
    		DefaultTreeModel treeModel = null;
    		{
    			DefaultMutableTreeNode node0 = new DefaultMutableTreeNode("JTree");
    			{
    				DefaultMutableTreeNode node1 = new DefaultMutableTreeNode("colors");
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("blue");
    					node1.add(node2);
    				}
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("violet");
    					node1.add(node2);
    				}
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("red");
    					node1.add(node2);
    				}
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("yellow");
    					node1.add(node2);
    				}
    				node0.add(node1);
    			}
    			{
    				DefaultMutableTreeNode node1 = new DefaultMutableTreeNode("sports");
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("basketball");
    					node1.add(node2);
    				}
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("soccer");
    					node1.add(node2);
    				}
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("football");
    					node1.add(node2);
    				}
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("hockey");
    					node1.add(node2);
    				}
    				node0.add(node1);
    			}
    			{
    				DefaultMutableTreeNode node1 = new DefaultMutableTreeNode("food");
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("hot dogs");
    					node1.add(node2);
    				}
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("pizza");
    					node1.add(node2);
    				}
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("ravioli");
    					node1.add(node2);
    				}
    				{
    					DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("bananas");
    					node1.add(node2);
    				}
    				node0.add(node1);
    			}
    			treeModel = new DefaultTreeModel(node0);
    		}
    		jTree0.setModel(treeModel);
    		jTree0.setComponentPopupMenu(getJPopupMenu1());
    	}
    	return jTree0;
    }

    private JPopupMenu getJPopupMenu1() {
    	if (jPopupMenu1 == null) {
    		jPopupMenu1 = new JPopupMenu();
    	}
    	return jPopupMenu1;
    }

    private JLabel getJLabel0() {
    	if (jLabel0 == null) {
    		jLabel0 = new JLabel();
    		jLabel0.setText("jLabel0");
    		jLabel0.setComponentPopupMenu(getJPopupMenu0());
    	}
    	return jLabel0;
    }

    private JPopupMenu getJPopupMenu0() {
    	if (jPopupMenu0 == null) {
    		jPopupMenu0 = new JPopupMenu();
    	}
    	return jPopupMenu0;
    }

    private JMenu getJMenu0() {
    	if (jMenu0 == null) {
    		jMenu0 = new JMenu();
    		jMenu0.setText("jMenu0");
    		jMenu0.add(getBehCJMenuItem());
    	}
    	return jMenu0;
    }

    private JMenuItem getBehCJMenuItem() {
    	if (behCJMenuItem == null) {
    		behCJMenuItem = new JMenuItem();
    		behCJMenuItem.setText("jMenuItem0");
    	}
    	return behCJMenuItem;
    }

    private JMenu getCheckerJMenu() {
    	if (checkerJMenu == null) {
    		checkerJMenu = new JMenu();
    		checkerJMenu.setText("Checker");
    		checkerJMenu.add(getNameCJMenuItem());
    		checkerJMenu.add(getNameCJMenuItem());
    	}
    	return checkerJMenu;
    }

    private JMenuItem getNameCJMenuItem() {
    	if (nameCJMenuItem == null) {
    		nameCJMenuItem = new JMenuItem();
    		nameCJMenuItem.setText("Check Behavior");
    	}
    	return nameCJMenuItem;
    }

    private JMenu getEvolutionJMenu() {
    	if (evolutionJMenu == null) {
    		evolutionJMenu = new JMenu();
    		evolutionJMenu.setText("Evolution");
    		evolutionJMenu.add(getSpecJMenu());
    		evolutionJMenu.add(getConfigJMenu());
    		evolutionJMenu.add(getAssJMenu());
    	}
    	return evolutionJMenu;
    }

    private JMenuItem getAssJMenu() {
    	if (assJMenu == null) {
    		assJMenu = new JMenu();
    		assJMenu.setText("Evolve Assembly");
    	}
    	return assJMenu;
    }

    private JMenuItem getConfigJMenu() {
    	if (configJMenu == null) {
    		configJMenu = new JMenu();
    		configJMenu.setText("Evolve AbstractConfiguration");
    	}
    	return configJMenu;
    }

    private JMenuItem getSpecJMenu() {
    	if (specJMenu == null) {
    		specJMenu = new JMenu();
    		specJMenu.setText("Evolve Sepcification");
    	}
    	return specJMenu;
    }

    private JMenuItem getNewJMenuItem() {
    	if (newJMenuItem == null) {
    		newJMenuItem = new JMenuItem();
    		newJMenuItem.setText("New");
    	}
    	return newJMenuItem;
    }



    private JMenu getJMenu() {
    	if (jMenu == null) {
    		jMenu = new JMenu();
    		jMenu.setText("File");
    		jMenu.add(getOpenJMenuItem());
    		jMenu.add(getOpenJMenuItem());
    	}
    	return jMenu;
    }

    private JMenuItem getOpenJMenuItem() {
    	if (openJMenuItem == null) {
    		openJMenuItem = new JMenuItem();
    		openJMenuItem.setText("jMenuItem0");
    	}
    	return openJMenuItem;
    }

    private static void installLnF() {
	try {
	    String lnfClassname = PREFERRED_LOOK_AND_FEEL;
	    if (lnfClassname == null)
		lnfClassname = UIManager.getCrossPlatformLookAndFeelClassName();
	    UIManager.setLookAndFeel(lnfClassname);
	} catch (Exception e) {
	    System.err.println("Cannot install " + PREFERRED_LOOK_AND_FEEL
		    + " on this platform:" + e.getMessage());
	}
    }

    /**
     * Main entry of the class.
     * Note: This class itfP only created so that you can easily preview the result at runtime.
     * It itfP not expected to be managed by the designer.
     * You can modify it as you like.
     */
    public static void main(String[] args) {
	installLnF();
	SwingUtilities.invokeLater(new Runnable() {
	    public void run() {
		menuGui frame = new menuGui();
		frame.setDefaultCloseOperation(menuGui.EXIT_ON_CLOSE);
		frame.setTitle("menuGui");
		frame.getContentPane().setPreferredSize(frame.getSize());
		frame.pack();
		frame.setLocationRelativeTo(null);
		frame.setVisible(true);
	    }
	});
    }

}
